Skip to main content
0
  1. Wiki/

Email Wiki: What is JMAP

Alibaba Email - More Product Services

JMAP (JSON Meta Application Protocol) is a modern, efficient protocol for synchronizing and managing emails, calendars, and contacts. It aims to replace traditional email protocols (such as IMAP and SMTP) by using JSON (JavaScript Object Notation) as the data exchange format, providing a more efficient, flexible, and developer-friendly API interface. JMAP was proposed by the Fastmail team and standardized by the Internet Engineering Task Force (IETF), and has now become an open standard (RFC 8620 and RFC 8621, etc.).

JMAP is not only applicable to email management but also supports multiple data types such as calendars, contacts, tasks, etc., making interactions between clients and servers more unified and efficient. It is particularly suitable for modern web and mobile applications, significantly reducing the number of network requests and data transmission volume, thereby enhancing the user experience.

Core Features of JMAP #

1. JSON-based Data Format #

JMAP uses JSON as its primary data exchange format. Compared to traditional protocols (such as IMAP using custom text protocols), JSON has the advantages of clear structure, easy parsing, and cross-platform compatibility. This allows developers to more easily build client and server-side applications.

2. Batch Operations and Efficient Synchronization #

JMAP supports batch operations, allowing clients to perform multiple operations (such as retrieving multiple emails or updating multiple calendar events) in a single HTTP request, thereby reducing network round trips. Additionally, JMAP provides an efficient synchronization mechanism where clients only need to retrieve changes since their last sync, without downloading all content each time, significantly reducing bandwidth consumption and synchronization time.

3. Stateful Synchronization #

JMAP introduces the concept of “state,” where the server maintains a state identifier for each dataset. During synchronization, clients can compare their local state with the server state and only retrieve changes, achieving efficient incremental synchronization.

4. Multi-device Support #

JMAP was designed with multi-device usage scenarios in mind. Users can access the same emails, calendars, and contacts on multiple devices while maintaining data consistency. Each device’s synchronization state is maintained independently, avoiding the state conflict issues common in traditional protocols.

5. Support for Multiple Data Types #

JMAP is not just an email protocol; it also supports:

  • Mail
  • Calendars
  • Contacts
  • Tasks
  • Mail Rules

This unified data model allows clients to use the same API interface to manage different types of data, greatly simplifying the development process.

6. Security and Authentication Mechanisms #

JMAP typically runs over HTTPS, ensuring data transmission security. Authentication mechanisms usually use OAuth 2.0, supporting modern authentication methods such as multi-factor authentication, token refresh, etc.

How JMAP Works #

1. Client-Server Architecture #

JMAP adopts a typical client-server architecture. Clients send requests to servers via HTTP/HTTPS protocol, and servers process the requests and return responses in JSON format.

2. API Endpoint #

JMAP defines a unified API endpoint (typically /jmap), through which clients send requests. Each request contains one or more “method calls,” which the server executes in sequence and returns the results.

3. Method Calls #

JMAP defines a series of methods for performing various operations, such as:

  • Email/get: Retrieve email content
  • Email/query: Query email lists
  • CalendarEvent/get: Retrieve calendar events
  • Contact/get: Retrieve contact information
  • Mailbox/get: Retrieve mailbox structure (such as inbox, sent items, etc.)

Each method call can carry parameters, and the server executes operations and returns responses based on these parameters.

4. Synchronization Mechanism #

JMAP implements efficient synchronization through “state tokens.” For example, when a client requests an email list for the first time, the server returns a state token. In subsequent requests, the client can include this token, and the server will only return data that has changed since the previous state.

This mechanism is particularly suitable for mobile devices and low-bandwidth environments, significantly reducing data transmission volume and synchronization time.

Comparison Between JMAP and Traditional Protocols #

Feature JMAP IMAP/SMTP
Data Format JSON Custom text protocol
Synchronization Efficiency High (incremental synchronization) Low (requires full download)
Supported Data Types Emails, calendars, contacts, tasks, etc. Emails only
Number of Requests Supports batch requests, reducing HTTP round trips Each operation requires a separate request
Development Difficulty Easy to parse and integrate, suitable for modern applications Complex protocol, higher development difficulty
Security Default HTTPS, supports OAuth 2.0 Relies on extensions like STARTTLS
Multi-device Synchronization Support Built-in support Requires additional mechanisms

JMAP Application Scenarios #

1. Modern Email Clients #

JMAP is suitable for developing high-performance web and mobile email clients. Due to its efficient synchronization mechanism and batch operation support, clients can quickly load emails, calendars, and contact information, enhancing the user experience.

2. Multi-device Synchronization Services #

For users who need to synchronize data across multiple devices (such as smartphones, tablets, laptops), JMAP provides a unified data access interface ensuring data consistency.

3. Third-party Application Integration #

Developers can use JMAP to build third-party email, calendar, or contact management applications without needing to understand the underlying protocol details. Being based on HTTP and JSON, it offers strong compatibility and easy integration.

4. Enterprise Email Systems #

JMAP supports enterprise-level email services, including email archiving, rule management, multi-user support, etc. Its unified data model also makes it easier for enterprises to manage calendars, meetings, tasks, and other collaboration tools.

Current Development Status and Future Prospects of JMAP #

Currently, JMAP has been adopted by multiple email service providers, including Fastmail, Apple (partial functionality), ProtonMail, etc. As the standard continues to improve, more and more developers and businesses are beginning to pay attention to and adopt JMAP as an alternative to traditional email protocols.

IETF has standardized JMAP as RFC 8620 (core protocol) and RFC 8621 (mail extension), with subsequent releases of calendar, contact, and other extension specifications. In the future, JMAP is expected to become one of the core protocols for next-generation email and collaboration services.

Conclusion #

JMAP represents the development direction of modern email and collaboration service protocols. Through unified data models, efficient synchronization mechanisms, and modernized API design, it solves many problems that traditional protocols face in terms of performance, security, and development efficiency. As more vendors and developers adopt JMAP, we have reason to believe it will become a mainstream protocol for email and collaboration services in the coming years."